<?php
session_start();

include 'connect.php';

$email =$_POST['email'];
$password =$_POST['password'];

$query = mysql_query ("SELECT * FROM user
WHERE EMAIL='$email' and PASSWORD='$password'");
$count =mysql_num_rows($query);

if ($count==TRUE)
  {
  
  session_register("EMAIL");
  session_register("PASSWORD");
  header("location:index(access).html?success");
  }
  else
echo "<script>alert('Wrong Email and Password!');
  javascript:history.go(-1);</script>";
?>